package com.example.sxt_practise.算法刷题;

import java.util.Scanner;

/**
 * @author gaofeng
 */
public class Main {
    public static void main(String[] args) {
        System.out.print("输入:") ;
        Scanner scan = new Scanner(System.in) ;
        String read = scan.nextLine() ;
        String target = scan.nextLine() ;
        int count = 0 ;
        for(int i =0; i < read.length();i++) {
           if(read.substring(i, i+1).equalsIgnoreCase(target)) {
               count++ ;
           }
        }
        System.out.print(count);
    }
}